package com.fr.data.core.define;

import com.fr.base.xml.XMLPrintWriter;
import com.fr.base.xml.XMLableReader;

public abstract class TopDefinition
{
  private int topValue = -1;
  private int topCate = -1;

  public void setTopValue(int paramInt)
  {
    this.topValue = paramInt;
  }

  public int getTopValue()
  {
    return this.topValue;
  }

  public void setTopCate(int paramInt)
  {
    this.topCate = paramInt;
  }

  public int getTopCate()
  {
    return this.topCate;
  }

  public void writeXML(XMLPrintWriter paramXMLPrintWriter)
  {
    paramXMLPrintWriter.startTAG("Top").attr("topCate", this.topCate).attr("topValue", this.topValue).end();
  }

  public void readXML(XMLableReader paramXMLableReader)
  {
    if (paramXMLableReader.isChildNode())
    {
      String str1 = paramXMLableReader.getTagName();
      if (str1.equals("Top"))
      {
        String str2;
        if ((str2 = paramXMLableReader.getAttr("topCate")) != null)
          this.topCate = Integer.parseInt(str2);
        if ((str2 = paramXMLableReader.getAttr("topValue")) != null)
          this.topValue = Integer.parseInt(str2);
      }
    }
  }
}